Auto merge of #2081 - vi:cargo_init, r=alexcrichton
authorbors <bors@rust-lang.org>
Sun, 24 Jan 2016 18:42:32 +0000 (18:42 +0000)
committerbors <bors@rust-lang.org>
Sun, 24 Jan 2016 18:42:32 +0000 (18:42 +0000)
Implement `cargo init` command and appropriate tests ( #21).

Features:
* Working like `cargo new` if there are no files in current directory
* Auto-detection of `--bin`
* Auto-detection of already existing VSC and appending to respecive ignore file
* Appending of appropriate `[lib]` or `[[bin]]` section to `Cargo.toml` in case of some non-standard source locations

Concerns:
* I'm not experienced in Rust + lazy => code looks poorer compared to the rest Cargo code
* The test don't cover 100% of functions
* Project consisting of both binary and library is not handled
* Many deviations from [previously proposed algorithm](https://github.com/rust-lang/cargo/pull/2008#issuecomment-145607870)


Trivial merge